import java.sql.SQLException;

public class DBConnectionVisit extends DBConnection {
    public DBConnectionVisit() throws SQLException {
        executeSQL("DROP TABLE IF EXISTS station_work_time");
        executeSQL(new StringBuilder().append("CREATE TABLE station_work_time(")
                        .append("station INT NOT NULL, ")
                        .append("`date` DATE NOT NULL, ")
                        .append("`from` TIME NOT NULL, ")
                        .append("`to` TIME NOT NULL, ")
                        .append("PRIMARY KEY(station, `date`))")
                        .append(getEngine() == null || getEngine().isBlank() ? "" : " ENGINE=" + getEngine())
                        .toString()
        );
    }
}
